.history-nav {
  background: #f8f9fa;
  padding: 20px 0;
}

/* New sub-navigation bar styles (safe version) */
.sub-nav-container {
  width: 100%;
  background: #f8f9fa;
  border-top: 1px solid #eee;
  border-bottom: 1px solid #eee;
  margin-top: -1px; /* Eliminate header bottom gap */
}

.sub-nav-container .wrapper {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 0;
}
.category-nav {
  display: flex;
  justify-content: center; /* Horizontally centered */
  align-items: center; /* Vertically centered */
  gap: 25px;
  margin: 0;
  padding: 0;
  list-style: none; /* Remove default list styles */
}
.category-nav a {
  text-decoration: none;
  color: #333;
  padding: 8px 100px;
  border-radius: 5px;
  transition: all 0.3s;
  font-size: 13px;
}

.category-nav a.active,
.category-nav a:hover {
  background: #d9f2b5;
  color: white;
}

.more {
  color: #666;
  font-size: 14px;
  transition: color 0.3s;
}

.more:hover {
  color: #4CAF50;
}

/* Content section styles default hidden */
.content-section {
  display: flex;
  flex-direction:row;
  padding: 60px ;
  animation: fadeIn 0.5s;
  background: url('../images图片库/背景图/背景1.1 .jpg') no-repeat center center;
  background-size: 100% 100%;
  align-items: center; /* Vertical alignment */
  justify-content: center; /* Horizontal alignment */
  opacity: 0;            /* Initial transparency */
  transition: opacity 0.3s ease; /* Fade-in effect */
}

/* Text styles */
.content-section p {
  text-align: center; /* Horizontally centered text */
  width: 80%; /* Limit text width */
  margin: 40px ;  /* Margin around text */
}

#cuisine-img {
  width: 30%; /* Set image width to 50% of parent container */
  height: auto; /* Maintain aspect ratio */
  margin: 40px; /* Adjust margin as needed */
}


.content-section.active {
  display: block;
}

/* Image styles */
.content-section img {
  height: auto;
  border-radius: 16px;
  margin: 35px;
  box-shadow: 0 2px 8px rgba(0,0,0,0.1);
  max-width: 80%;
}
/* Special layout adjustments (for dual-column images) */
.flex-container img {
  max-width: 40%;        
}

/* Active content section */
.content-section.active {
  display: block;        /* Display content block */
  opacity: 1;            /* Fully opaque */
}
/* Layout styles */
.flex-container {
  display: flex;
  align-items: center;
  gap: 30px; 
  margin: 20px 0;
} 

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}


/* New added code */
/* Adjustments for small layouts */
.intangible-img{
  width: 60%; /* Image width */
  margin: 40px; /* Image margin */
}
.history-img{
  width: 60%; /* Image width */
  margin: 40px; /* Image margin */
}

/* .folk-img{
  width: 85%; 
  margin: 20px; 
} */

.folk-img {
    width: 100% !important; /* 强制应用宽度 */
    max-width: 100% !important; /* 确保图片不会超出父容器 */
    margin: 10px !important; /* 调整外边距 */
    border-radius: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.image-content, .content-section {
    max-width: none; /* 移除宽度限制 */
    max-height: none; /* 移除高度限制 */
}

.content-section img, .flex-container img {
    max-width: 100%; /* 确保图片不会超出父容器 */
    height: auto; /* 保持图片的宽高比 */
}


/* Adding to CSS */
#history {
  display: flex;       /* Enable flex layout */
  gap: 20px;          /* Image gap */
  align-items: flex-start; /* Top alignment */
  min-height: 400px;    /* Minimum height based on content */
}

#history .Left,
#history .Right {
  flex: 1;            /* Equal width distribution */
}

#history .Right {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

/* Adjustments for intangible cultural heritage section */
#intangible .Top,
#intangible .Bottom {
  display: flex;
  gap: 20px;
  margin: 20px 0; 
}

#intangible .left,
#intangible .right {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center; /* Vertical centering of content */
}

/* Common rules for all image containers */
.content-section img {
  max-width: 80%;    /* Prevent overflow */
  height: auto;       /* Maintain aspect ratio */
  object-fit: cover;  /* Optional: Maintain cropping ratio */
}

.flex-container img {
  max-width: 40%;        
}

/* Ensuring inactive sections do not occupy space */
.content-section:not(.active) {
  display: none !important; /* Forcefully hide */
  height: 0;              /* Remove space entirely */
  padding: 0 !important;
  margin: 0 !important;
}

/* Fly-in animation styles */
.fly-in {
    opacity: 0;
    transform: translateX(-100%);
    transition: all 1s ease;
}
.fly-in.active {
    opacity: 1;
    transform: translateX(0);
}
.hover-zoom img {
    transition: transform 0.5s ease;
}
.hover-zoom img:hover {
    transform: scale(1.1);
}
body {
    background: linear-gradient(180deg, #ffffff, #f8f9fa);
    background-size: 100% 200%;
    transition: background-position 1s;
}
.typewriter {
    /* font-family: monospace; */
    white-space: nowrap;
    overflow: hidden;
    width: 0;
    animation: typing 3.5s steps(40, end), blink-caret .75s step-end infinite;
}
@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}
@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: black }
}

/* Sub-container for content sections */
.Top, .Bottom {
  display: flex;
  gap: 30px; /* Gap */
  width: 100%;
}

.Top .left, .Top .right, .Bottom .left, .Bottom .right {
  flex: 1; /* Equal width distribution */
}

.Top .left p, .Bottom .right p {
  text-align: center; /* Horizontally centered text */
  width: 80%; /* Limit text width */
  margin: 40px; /* Margin around text */
}



p {
    /* font-family: "STXingkai"; */
    font-style: italic;
    font-size: 20px;
    color: #333;
    letter-spacing: 0.5px; /* Character spacing */
}

/* Print button styles */
.print-button {
    background-color: #b0c9b1; /* Button background color */
    color: white; /* Button text color */
    border: none; /* Remove border */
    padding: 10px 20px; /* Inner padding */
    font-size: 15px; /* Font size */
    cursor: pointer; /* Hand cursor on hover */
    border-radius: 5px; /* Rounded corners */
    transition: background-color 0.3s; /* Background color transition effect */
}

/* Hover styles for print button */
.print-button:hover {
    background-color: #f9edf5; /* Background color on hover */
}